//
//  UILabel+Init.m
//  Supervisor
//
//  Created by 小宇 on 2017/5/12.
//  Copyright © 2017年 北京怀教网络科技股份有限公司. All rights reserved.
//

#import "UILabel+Init.h"
@interface UILabel ()<UIGestureRecognizerDelegate>
@end
@implementation UILabel (Init)
- (instancetype)initWithFrame:(CGRect)frame Text:(NSString *)text TextColor:(UIColor *)color TextAlignment:(NSTextAlignment)textAlignment Font:(UIFont *)font Target:(nullable id)target Action:(nullable SEL)action{
    if (self =[super init]) {
        self.frame = frame;
        self.text = text;
        self.textColor = color;
        self.font = font;
        self.textAlignment = textAlignment;
        if (action) {
            self.userInteractionEnabled = YES;
            UITapGestureRecognizer *tapges = [[UITapGestureRecognizer alloc]initWithTarget:target action:action];
            [self addGestureRecognizer:tapges];
        }
    }
    return self;
}

@end
